package com.yikome.shop.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@Entity
@Table(name = "s_collection_product", indexes = {@Index(columnList = "collectionId") , @Index(columnList = "productId")})
public class CollectionProduct implements Serializable{

	private static final long serialVersionUID = -4262754245631860068L;

	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id ; 
	
	private Long collectionId; 
	
	private Long productId ; 
	
	private Integer priority ;

	public CollectionProduct(Long collectionId, Long productId, Integer priority) {
		super();
		this.collectionId = collectionId;
		this.productId = productId;
		this.priority = priority;
	} 
}
